package cn.sanshuilin.kst.system.provider.bean;

import javax.persistence.*;
import java.io.Serializable;
import java.sql.Date;

/**
 * @author greenlee
 * @version v1.0
 * @create 创建时间: 2017-12-03 18:31
 * Copyright 2017  by 三水林科技有限公司
 **/
@Entity
@Table(name = "Information")
public class Information implements Serializable {
    private String id;
    private String title;
    private String attachmentIDs;
    private String pubMemberId;
    private Date pubDate;
    private Integer statusId;
    private Integer categoryId;
    private String url;
    private Integer hotId;
    private Integer isFocusId;


    public String img ;
    public String link ;
    public Member pubMember ;
    public String pubMemberName ;
    public String categoryName ;
    public String platformIDs ;
    public String platformNames ;
    public String hotName;
    public String statusName ;

    public String isFocusName ;
    @Transient
    public String getImg() {
        return img;
    }
    @Transient
    public String getLink() {
        return link;
    }
    @Transient
    public Member getPubMember() {
        return pubMember;
    }
    @Transient
    public String getPubMemberName() {
        return pubMemberName;
    }
    @Transient
    public String getCategoryName() {
        return categoryName;
    }
    @Transient
    public String getPlatformIDs() {
        return platformIDs;
    }
    @Transient
    public String getPlatformNames() {
        return platformNames;
    }
    @Transient
    public String getHotName() {
        return hotName;
    }
    @Transient
    public String getStatusName() {
        return statusName;
    }

    public void setImg(String img) {
        this.img = img;
    }

    public void setLink(String link) {
        this.link = link;
    }

    public void setPubMember(Member pubMember) {
        this.pubMember = pubMember;
    }

    public void setPubMemberName(String pubMemberName) {
        this.pubMemberName = pubMemberName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public void setPlatformIDs(String platformIDs) {
        this.platformIDs = platformIDs;
    }

    public void setPlatformNames(String platformNames) {
        this.platformNames = platformNames;
    }

    public void setHotName(String hotName) {
        this.hotName = hotName;
    }

    public void setStatusName(String statusName) {
        this.statusName = statusName;
    }

    public void setIsFocusName(String isFocusName) {
        this.isFocusName = isFocusName;
    }

    @Transient

    public String getIsFocusName() {
        return isFocusName;
    }

    @Id
    @Column(name = "ID", nullable = false, length = 32)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "Title", nullable = true, length = 32)
    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Basic
    @Column(name = "AttachmentIDs", nullable = true, length = 32)
    public String getAttachmentIDs() {
        return attachmentIDs;
    }

    public void setAttachmentIDs(String attachmentIDs) {
        this.attachmentIDs = attachmentIDs;
    }

    @Basic
    @Column(name = "PubMemberID", nullable = true, length = 32)
    public String getPubMemberId() {
        return pubMemberId;
    }

    public void setPubMemberId(String pubMemberId) {
        this.pubMemberId = pubMemberId;
    }

    @Basic
    @Column(name = "PubDate", nullable = true)
    public Date getPubDate() {
        return pubDate;
    }

    public void setPubDate(Date pubDate) {
        this.pubDate = pubDate;
    }

    @Basic
    @Column(name = "StatusID", nullable = true)
    public Integer getStatusId() {
        return statusId;
    }

    public void setStatusId(Integer statusId) {
        this.statusId = statusId;
    }

    @Basic
    @Column(name = "CategoryID", nullable = true)
    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    @Basic
    @Column(name = "Url", nullable = true, length = 255)
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    @Basic
    @Column(name = "HotID", nullable = true)
    public Integer getHotId() {
        return hotId;
    }

    public void setHotId(Integer hotId) {
        this.hotId = hotId;
    }

    @Basic
    @Column(name = "IsFocusID", nullable = true)
    public Integer getIsFocusId() {
        return isFocusId;
    }

    public void setIsFocusId(Integer isFocusId) {
        this.isFocusId = isFocusId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Information that = (Information) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (title != null ? !title.equals(that.title) : that.title != null) return false;
        if (attachmentIDs != null ? !attachmentIDs.equals(that.attachmentIDs) : that.attachmentIDs != null)
            return false;
        if (pubMemberId != null ? !pubMemberId.equals(that.pubMemberId) : that.pubMemberId != null) return false;
        if (pubDate != null ? !pubDate.equals(that.pubDate) : that.pubDate != null) return false;
        if (statusId != null ? !statusId.equals(that.statusId) : that.statusId != null) return false;
        if (categoryId != null ? !categoryId.equals(that.categoryId) : that.categoryId != null) return false;
        if (url != null ? !url.equals(that.url) : that.url != null) return false;
        if (hotId != null ? !hotId.equals(that.hotId) : that.hotId != null) return false;
        if (isFocusId != null ? !isFocusId.equals(that.isFocusId) : that.isFocusId != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (title != null ? title.hashCode() : 0);
        result = 31 * result + (attachmentIDs != null ? attachmentIDs.hashCode() : 0);
        result = 31 * result + (pubMemberId != null ? pubMemberId.hashCode() : 0);
        result = 31 * result + (pubDate != null ? pubDate.hashCode() : 0);
        result = 31 * result + (statusId != null ? statusId.hashCode() : 0);
        result = 31 * result + (categoryId != null ? categoryId.hashCode() : 0);
        result = 31 * result + (url != null ? url.hashCode() : 0);
        result = 31 * result + (hotId != null ? hotId.hashCode() : 0);
        result = 31 * result + (isFocusId != null ? isFocusId.hashCode() : 0);
        return result;
    }
}
